//1. vptr is reset to the vtbl associated with the class
//2. body of the destructor
//3. member class objects are invoked in the reverse order of their declaration
//4. immediate base class with destructor
//5. virtual base class with destructor && 
//5. this class represents the most-derived class
//5. in reverse order

//vptr is set correctly before member objects and 
//body in both constructor and destrutor

#include <iostream>
using namespace std;
class A {
public:
  virtual void v(){cout<<"A::v()"<<endl;}
  void n(){cout<<"A::n()"<<endl;}
  ~A(){v();n();}
};

class B : public A {
public:
  void v(){cout<<"B::v()"<<endl;}
  void n(){cout<<"B::n()"<<endl;}
  ~B(){v();n();}
};

int main()
{
  B b;
  return 0;
}
